#
FROM        csphere/jdk:1.8.0
MAINTAINER  vincent.chen <vincent01.chen@vipshop.com>

ENV ZOOKEEPER_VERSION 3.4.6
ENV ZOOKEEPER_HOME /apps/svr

# Install zookeeper
RUN mkdir -p /apps/svr

COPY zookeeper-3.4.6.tar.gz /apps/svr

RUN tar -zxvf /apps/svr/zookeeper-3.4.6.tar.gz -C /apps/svr && \
    ln -snvf /apps/svr/zookeeper-3.4.6 zookeeper && \
    mkdir -p /apps/dat/zookeeper && \
    mkdir -p /apps/logs/zookeeper && \
    mkdir -p /apps/logs/zk_out/

COPY zoo.cfg /apps/svr/zookeeper-3.4.6/conf/

EXPOSE 2888 3888

